package lesson14;

public class Car {

	String model;
	int maxSpeed;
	int currentSpeed;
	String color;
	int gear;
	Person owner;
	
	void accelerate(int acceleration)
	{
		if (currentSpeed >= maxSpeed)
		{
			currentSpeed = maxSpeed;
			System.out.println("Max speed reached!");
		}
		currentSpeed+=acceleration;
	}
	
	void changeGearUp() 
	{
		gear++;
	}
	
	void chnageGearDown()
	{
		gear--;
	}
	
	void changeGear(int nextGear)
	{
		gear = nextGear;
	}
	
	void changeColor(String newColor)
	{
		color = newColor;
	}
}
